package com.hfut.jpoa.common.util;

import java.util.Date;

/**
 * 
 * 得到唯一编码
 * @author  yanglong
 * @version  [1.0, 2013-7-10]
 * @since  [产品/1.0]
 */
public class UID {
    private static int gene = 0;
    
    public static synchronized String getID() {
        int t = gene++ % 1000;
        String result = "" + new Date().getTime();
        if (t < 10)
            result += "00" + t;
        else if (t < 100)
            result += "0" + t;
        else
            result += t;
        return result;
    }
}
